![]() |
GetNextProcess |
||||
Header: | Processes.h | Carbon status: | Supported | |
Gets information about the next process, if any, in the Process Manager’s internal list of open processes.
OSErr GetNextProcess ( ProcessSerialNumber *PSN );
On input, a pointer to the process serial number of a process. This number should be a valid process serial number returned from LaunchApplication, GetFrontProcess, or GetCurrentProcess, or else the defined constant kNoProcess. On return, a pointer to the process serial number of the next process, or else kNoProcess.
A result code.
The Process Manager maintains a list of all open processes. You can derive this list by using repetitive calls to GetNextProcess. Begin generating the list by calling GetNextProcess and specifying the constant kNoProcess in the PSN parameter. You can then use the returned process serial number to get the process serial number of the next process. Note that the order of the list of processes is internal to the Process Manager. When the end of the list is reached, GetNextProcess returns the constant kNoProcess in the PSN parameter and the result code procNotFound.
You can use the returned process serial number in other Process Manager functions. You can also use this process serial number to specify a target application when your application sends a high-level event.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)